package com.mh.www.mh_frame.view.fragment;

import android.app.Fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.mh.www.mh_frame.R;
import com.mh.www.mh_frame.view.widget.CustomTimePick;
import com.mh.www.mh_frame.view.widget.datepick.bean.DateType;
import com.mh.www.mh_frame.view.widget.datepick.listener.OnSureLisener;

import java.util.Date;

/**
 * @author think
 * @version [版本号, 2018/1/15]
 * @see [相关类/方法]
 * @since [V1]
 */

public class OneFragment extends Fragment  {
    private Button button;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_query_entry,null);
        initView(view);
        return view;
    }

    private void initView(View view){
      button = view.findViewById(R.id.date);
      button.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              CustomTimePick.showDatePickDialog(getActivity(), DateType.TYPE_YMDHM, new OnSureLisener() {
                  @Override
                  public void onSure(Date date) {

                  }
              });
          }
      });
    }
}
